package com.ll.stringbufferdemo;

/**
 * @author 刘龙
 * @version 1.0
 */
public class StringBuffer03 {
    public static void main(String[] args) {
        String str = null;
        StringBuffer stringBuffer = new StringBuffer();
        stringBuffer.append(str);
        // 4
        System.out.println(stringBuffer.length());

        // null
        System.out.println(stringBuffer);

        StringBuffer stringBuffer1 = new StringBuffer(str);

        // NullPointerException
        System.out.println(stringBuffer1);
    }
}
